package cn.ren.hai.base.service.impl;

import cn.ren.hai.core.entity.QueryPage;
import cn.ren.hai.base.entity.RhTableFieldAttribute;
import cn.ren.hai.base.mapper.RhTableFieldAttributeMapper;
import cn.ren.hai.base.service.RhTableFieldAttributeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageHelper;
import cn.ren.hai.core.entity.PageInfo;
import cn.ren.hai.core.entity.QueryPage;


import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

/**
 * 表字段默认配置(RhTableFieldAttribute)表服务实现类
 *
 * @author makejava
 * @since 2022-01-23 02:13:41
 */
@Service("rhTableFieldAttributeService")
public class RhTableFieldAttributeServiceImpl extends ServiceImpl<RhTableFieldAttributeMapper, RhTableFieldAttribute>  implements RhTableFieldAttributeService {
    
    private final RhTableFieldAttributeMapper rhTableFieldAttributeMapper;
    
    public RhTableFieldAttributeServiceImpl(RhTableFieldAttributeMapper rhTableFieldAttributeMapper) {
        this.rhTableFieldAttributeMapper = rhTableFieldAttributeMapper;
    }    

    @Override
    public PageInfo<RhTableFieldAttribute> list(QueryPage<RhTableFieldAttribute> page) {
        QueryWrapper<RhTableFieldAttribute> queryWrapper = new QueryWrapper<>();
        PageHelper.startPage(page);
        return new PageInfo<>(rhTableFieldAttributeMapper.selectList(queryWrapper));
    }
   
}

